package org.testis.testdriver;

import java.util.HashMap;


/**
 *
 * @author barisergun
 */
public class TestPlanGlobalsHashMap {
    
    private static TestPlanGlobalsHashMap m_currentmap;
    private HashMap<String,String> m_testplanglobals;
    private HashMap<String,String> m_testplanlanguages;
    private HashMap<String,String> m_testplandutvalues;
    private TestPlanGlobalsHashMap()
    {
        m_testplanglobals = new HashMap<String, String>();
        m_testplanlanguages = new HashMap<String, String>();
        m_testplandutvalues = new HashMap<String, String>();
    }
    
    public static TestPlanGlobalsHashMap createInstance()
    {
        if (m_currentmap == null) {
            m_currentmap = new TestPlanGlobalsHashMap();
        }

        return m_currentmap;
    }
    
    public void putAllGlobalsValues(HashMap<String, String> entry)
    {
        m_testplanglobals.putAll(entry);
    }
    public void putAllLangValues(HashMap<String, String> entry)
    {
        m_testplanlanguages.putAll(entry);
    }
    public void putAllDutValues(HashMap<String, String> entry)
    {
        m_testplandutvalues.putAll(entry);
    }
    public String getGlobalValue(String key)
    {
        return m_testplanglobals.get(key);
    }
    public String getLangValue(String key)
    {
        return m_testplanlanguages.get(key);
    }
    public String getDutValue(String key)
    {
        return m_testplandutvalues.get(key);
    }

    public HashMap<String, String> getTestplandutvalues() {
        return m_testplandutvalues;
    }

    public HashMap<String, String> getTestplanglobals() {
        return m_testplanglobals;
    }

    public HashMap<String, String> getTestplanlanguages() {
        return m_testplanlanguages;
    }

    public void resetMaps()
    {
        m_testplanglobals.clear();
        m_testplanlanguages.clear();
        m_testplandutvalues.clear();
        m_currentmap = null;
        
    }
    
}
